#include<stdio.h>

int main(void)
{
	char c;
	int n=0;
	while( (c=getchar())!='\n')
	{
		if(c!=' ')
		{
			n++;
			printf("%c",c);
		}
	}
	printf("\n%d\n",n);
	return 0;
}
